import 'package:flutter/material.dart';

class ToastView extends StatelessWidget {
  const ToastView(this.msg, {super.key});

  final String msg;

  @override
  Widget build(BuildContext context) {
    return Container(
      alignment: Alignment.center,
      margin: const EdgeInsets.fromLTRB(32.0, 0.0, 32.0, 0.0),
      child: Container(
        padding: const EdgeInsets.symmetric(vertical: 8.0, horizontal: 12.0),
        decoration: BoxDecoration(
          color: const Color(0xb3000000),
          borderRadius: BorderRadius.circular(6.0),
        ),
        child: Text(
          msg,
          maxLines: 1,
          overflow: TextOverflow.ellipsis,
          style: const TextStyle(
            color: Colors.white,
            fontSize: 14,
            fontWeight: FontWeight.bold,
          ),
        ),
      ),
    );
  }
}
